package com.mycoupon.mycouponframework.exception;

import com.mycoupon.mycouponframework.errorcode.BaseErrorCode;
import com.mycoupon.mycouponframework.errorcode.IErrorCode;
import jakarta.servlet.http.PushBuilder;

/**
 * @projectName: MyCoupon
 * @package: com.mycoupon.mycouponframework.exception
 * @className: ClientException
 * @author: thinkBook
 * @description: 客户端异常
 * @date: 2025/4/4 22:22
 * @version: 1.0
 */
public class ClientException extends AbstractException{

    public ClientException(IErrorCode errorCode) {
        super(null,null,errorCode);
    }

    public ClientException(String message) {
        super(message,null, BaseErrorCode.CLIENT_ERROR);
    }

    public ClientException(String message, IErrorCode errorCode) {
        super(message,null, errorCode);
    }

    public ClientException(String message, Throwable throwable, IErrorCode errorCode) {
        super(message, throwable, errorCode);
    }

    @Override
    public String toString() {
        return "ClientException{" +
                "errorCode='" + errorCode + '\'' +
                ", errorMessage='" + errorMessage + '\'' +
                '}';
    }
}
